require "import";
import "android.content.Context"
import "android.os.VibrationEffect"
import "android.os.Vibrator"
import "android.content.Intent"
context = activity or service
vibrator = context.getSystemService(Context.VIBRATOR_SERVICE)
vibrator.vibrate(100)

local on= "Modul întunecat,Activ*|Mod Întunecat,Pornit*|Mod întunecat,Activ*|Modul întunecat,Activ*|Modul întunecat, Activ*" 

local off= "Modul întunecat,Dezactiv*|Mod Întunecat,Oprit*|Mod întunecat,Dezact*|Modul întunecat,Dezact*|Modul întunecat, Dezact*" 


service.execute('Suspendare motor TTS principal')
if service.execute('setări rapide') then
service.postExecute(500, '', node, function()
if this.findAccessibilityNodeInfo(off) then
this.click({
{off .. ">5$0", 
'%返回<2'}
})
service.playSoundTick()
this.postSpeak(2300,  'Modul întunecat, activat. ')
service.postClick(2250,{
"%Suspendare motor TTS principal"})
elseif this.findAccessibilityNodeInfo(on) then
this.click({
{on .. ">5$0", 
'%返回<2'}
})
service.playSoundGestureEnd()
this.postSpeak(2300, 'Modul întunecat, dezactivat. ')

service.postClick(2250,{
"%Suspendare motor TTS principal"})
end
end)
return true
end